function result = countStats(filename)

COLUMN_BALL_IN = 7;
COLUMN_SHOTS_COUNT = 12;
COLUMN_SUCCESSFUL_PASS = 13;
COLUMN_SUCCESSFUL_CAPTURE = 14;

rawData = load ('-ascii',filename);
ballInData = rawData(find(rawData(:,COLUMN_BALL_IN) > 0), :);

shotCount = sum(ballInData(find(ballInData(:,COLUMN_SHOTS_COUNT) > 0) , COLUMN_SHOTS_COUNT));
passCount = sum(ballInData(find(ballInData(:,COLUMN_SUCCESSFUL_PASS) > 0) , COLUMN_SUCCESSFUL_PASS));
captureCount = sum(ballInData(find(ballInData(:,COLUMN_SUCCESSFUL_CAPTURE) > 0) , COLUMN_SUCCESSFUL_CAPTURE));

result = [shotCount, passCount, captureCount];
	
endfunction